<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <h1>target.html</h1>
<p></p>
</body>
<script src="https://www.jq22.com/jquery/jquery-2.1.1.js"></script>
<script>
    let user = '[[${user.name}]]';
    console.log(user);
    let socket = new WebSocket("ws://localhost:8899/myWs/[[${user.name}]]");
    socket.onopen = function (response) {

    }

    socket.onclose = function (response) {
    }

    socket.onmessage = function (response) {
        $("p").text(response.data);
        console.log(response);
    }
</script>
</html>